Repository navigation
PostgreSQL: parse CREATE GROUP - #2429
Open
LucaCappelletti94 wants to merge 8 commits into
Open
LucaCappelletti94 wants to merge 8 commits into
LucaCappelletti94 wants to merge 8 commits into
Conversation
LucaCappelletti94
marked this pull request as ready for review
August 5, 2026 14:13
LucaCappelletti94
force-pushed
the
pg-create-drop-group
branch
2 times, most recently
from
August 24, 2026 11:52
a81ad93 to
eb95863
Compare
LucaCappelletti94
force-pushed
the
pg-create-drop-group
branch
from
September 3, 2026 17:05
eb95863 to
0dc690e
Compare
LucaCappelletti94
force-pushed
the
pg-create-drop-group
branch
4 times, most recently
from
September 22, 2026 21:20
12418e2 to
bc8d980
Compare
LucaCappelletti94
added a commit
to LucaCappelletti94/sqlparser-rs
that referenced
this pull request
Oct 2, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2429 +/- ##
==========================================
+ Coverage 81.99% 82.03% +0.03%
==========================================
Files 42 42
Lines 35049 35081 +32
Branches 35049 35081 +32
==========================================
+ Hits 28740 28777 +37
+ Misses 2744 2736 -8
- Partials 3565 3568 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
LucaCappelletti94
force-pushed
the
pg-create-drop-group
branch
from
October 2, 2026 16:15
f391d2c to
931d7f3
Compare
LucaCappelletti94
force-pushed
the
pg-create-drop-group
branch
3 times, most recently
from
October 17, 2026 01:00
2ed5332 to
a99e919
Compare
LucaCappelletti94
force-pushed
the
pg-create-drop-group
branch
from
October 18, 2026 14:11
a99e919 to
ddda956
Compare
sabir-akhadov-localstack
approved these changes
Oct 19, 2026
sabir-akhadov-localstack
left a comment
Contributor
There was a problem hiding this comment.
One non-blocking comment inline.
| &mut self, | ||
| role_keyword: RoleKeyword, | ||
| ) -> Result<CreateRole, ParserError> { | ||
| let if_not_exists = matches!(role_keyword, RoleKeyword::Role) |
Contributor
There was a problem hiding this comment.
PostgreSQL rejects IF NOT EXISTS for CREATE ROLE too, so this guard only makes the two spellings diverge: CREATE GROUP IF NOT EXISTS g now takes IF as the group name and fails with Expected: end of statement, found: NOT. Either drop the guard to keep parity with ROLE, or reject it with an explicit error.
Contributor
Author
There was a problem hiding this comment.
Now it rejects consistently in both cases
LucaCappelletti94
force-pushed
the
pg-create-drop-group
branch
4 times, most recently
from
October 24, 2026 06:32
7ee5832 to
85ff986
Compare
CREATE GROUP and DROP GROUPCREATE GROUP
LucaCappelletti94
requested review from
alamb and
sabir-akhadov-localstack
and removed request for
sabir-akhadov-localstack
October 24, 2026 13:39
LucaCappelletti94
force-pushed
the
pg-create-drop-group
branch
from
October 24, 2026 13:41
2907c7e to
88847f9
Compare
LucaCappelletti94
force-pushed
the
pg-create-drop-group
branch
from
October 24, 2026 14:32
88847f9 to
20d98f8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PostgreSQL accepts
CREATE GROUPas an obsolete spelling ofCREATE ROLE. Parse it intoCreateRoleand preserve theGROUPkeyword when formatting, since Amazon Redshift distinguishes user groups from roles.DROP GROUPandALTER GROUPare left for separate PRs.PostgreSQL syntax reference https://www.postgresql.org/docs/current/sql-creategroup.html